package com.zwh.modules.beancompare;

import java.util.List;

import com.alibaba.fastjson.JSONObject;
import com.zwh.common.utils.bean.BeanCompareUtil;
import com.zwh.common.utils.bean.FieldInfo;

/**
 * @author zwh
 * @date 2021/6/17 16:23
 **/
public class TestBeanCompareUtil {
    public static void main(String[] args) {
        BeanCompareUtil beanCompareUtil = new BeanCompareUtil();
        OperationEntity newData = new OperationEntity("1", "张三", 10);
        OperationEntity oldData = new OperationEntity("1", "张三1", 12);
        List<FieldInfo> list= beanCompareUtil.getDifferAttr(newData, oldData, "123");
        System.out.println(JSONObject.toJSONString(list));
    }
}
